package com.ysh.gsm;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@IdClass(CdrDePK.class)
@Entity()
@Table(name = "cdr_mr_dedicated")
public class CdrMrDe implements Serializable{

	private static final long serialVersionUID = -6171881418143345792L;

	private Callleg callLeg;
	private int cellId;
	private short sequence;
	private int startTime;	
	private short startTimeExt;	
	private TimeDimension timeDimension;
	private int probeId;
	private byte measureId;
	private short mvalue;
	
	@Id
	public Callleg getCallLeg() {
		return callLeg;
	}
	@Id
	public short getSequence() {
		return sequence;
	}
	@Column(name = "cell_id", nullable = false)
	public int getCellId() {
		return cellId;
	}
	@Column(name = "start_time", nullable = false)
	public int getStartTime() {
		return startTime;
	}
	@Column(name = "start_time_ext" , nullable = false)
	public short getStartTimeExt() {
		return startTimeExt;
	}
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "time_key", referencedColumnName = "time_key",nullable = false)
	public TimeDimension getTimeDimension() {
		return timeDimension;
	}
	@Column(name = "probe_key", nullable = false)
	public int getProbeId() {
		return probeId;
	}

	@Column(name = "measurement_id", nullable = false)
	public byte getMeasureId() {
		return measureId;
	}
	@Column(name = "value", nullable = false)
	public short getMvalue() {
		return mvalue;
	}
	
	public void setCallLeg(Callleg callLeg) {
		this.callLeg = callLeg;
	}
	public void setCellId(int cellId) {
		this.cellId = cellId;
	}
	public void setSequence(short sequence) {
		this.sequence = sequence;
	}
	public void setStartTime(int startTime) {
		this.startTime = startTime;
	}
	public void setStartTimeExt(short startTimeExt) {
		this.startTimeExt = startTimeExt;
	}
	public void setTimeDimension(TimeDimension timeDimension) {
		this.timeDimension = timeDimension;
	}
	public void setProbeId(int probeId) {
		this.probeId = probeId;
	}
	public void setMeasureId(byte measureId) {
		this.measureId = measureId;
	}
	public void setMvalue(short mvalue) {
		this.mvalue = mvalue;
	}
	

}
